#include "sht.h"

ClosedCube_SHT31D _sht31;
SHT31D sht_res;
SHT31 sht31;

void shtInit(void)
{
    _sht31.begin(0x44);    
}

void shtTask(void)
{
    sht_res = _sht31.readTempAndHumidity(SHT3XD_REPEATABILITY_LOW, SHT3XD_MODE_CLOCK_STRETCH, 50);    
    sht31.temp = (uint16)(sht_res.t*100);
    sht31.humi = (uint16)(sht_res.rh*100);
    // Serial.print("Humidity: ");    
    // Serial.print(sht_res.rh);    
    // Serial.print(" Temperature: ");    
    // Serial.println(sht_res.t);
}
